
<!DOCTYPE html>
<html ng-app="overallViewApp">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link href="../../build/common/base.css" rel="stylesheet">
    <script type="text/javascript" src="../../build/common/base.js"></script>
    <script type="text/javascript" src="../../build/common/ngEdit.js"></script>

    <script type="text/javascript" src="../../build/common/easyLayout.js"></script>
    <script type="text/javascript" src="../../assets/js/platform/bpm/overallView/overallViewController.js"></script>
    <script type="text/javascript" src="../../assets/js/platform/bpm/overallView/formatJson.js"></script>
    <script type="text/javascript"> var defId = ""; </script>
</head>
<body ng-controller="overallViewController" class="easy-layout">
<div data-options="region:'north'">
    <div class="toolbar-panel">
        <div class="buttons">
            <a class="btn  btn-primary fa-save" ng-click="saveImportPreview()"><span>上传保存</span></a>
            <a class="btn  btn-primary fa-back" onclick="javascript:$.Dialog.close(window);"><span>返回</span></a>
        </div>
    </div>
    <form class="form-inline"  method="post" enctype="multipart/form-data">
        <div class="form-group">
            <input type="file" class="form-control" id="exampleInputEmail3" name="xmlFile" accept="application/zip">
        </div>
        <button type="button" ng-click='importPreview()' class="btn btn-primary">上传预览</button>
    </form>

    <div ng-init="showForm=true;showNodeSkip=true;showScript=true;showBtn=true;isShowGateway=true;showGlobalConf=true;showUserConf=true;">
        <label><input type="checkbox" ng-model="showUserConf">人员配置  </label>
        <label><input type="checkbox" ng-model="showForm">表单  </label>
        <label><input type="checkbox" ng-model="showNodeSkip">节点自由跳转  </label>
        <label><input type="checkbox" ng-model="showScript">前后置脚本  </label>
        <label><input type="checkbox" ng-model="showBtn">节点按钮  </label>
        <label><input type="checkbox" ng-model="isShowGateway">分支脚本  </label>
        <label><input type="checkbox" ng-model="showGlobalConf">全局配置  </label>
        <br>
        <label><input type="radio" name="showOne" ng-click="justShowOne('showUserConf')" >展示人员  </label>
        <label><input type="radio" name="showOne" ng-click="justShowOne('showForm')" >展示表单  </label>
        <label><input type="radio" name="showOne" ng-click="justShowOne('showNodeSkip')" >展示节点跳转  </label>
        <label><input type="radio" name="showOne" ng-click="justShowOne('showScript')" >展示前后置脚本  </label>
        <label><input type="radio" name="showOne" ng-click="justShowOne('showBtn')" >展示节点按钮  </label>
        <label><input type="radio" name="showOne" ng-click="justShowOne('isShowGateway')">展示分支脚本  </label>

        <label>脚本框高度适应内容:</label>
        <div  ng-click="autoTextAreaHeight('nodeScript')" class="btn btn-sm btn-primary">节点脚本</div>
        <div  ng-click="autoTextAreaHeight('nodeBtnScript')" class="btn btn-sm btn-primary">按钮脚本</div>
        <div  ng-click="autoTextAreaHeight('gatewayScript')" class="btn btn-sm btn-primary">分支脚本</div>
        <div  ng-click="autoTextAreaHeight('nodeSkipScript')" class="btn btn-sm btn-primary">节点跳转</div>
        <div  ng-click="autoTextAreaHeight('formInitScript')" class="btn btn-sm btn-primary">表单初始化</div>
    </div>
</div>
<div data-options="region:'center'" style="width:100%;height:100%;">
    <ul class="nav nav-tabs" role="tablist">
        <li role="presentation" ng-repeat="(defName,overallViewList) in importOverallViewMap"  class="{{$index==0?'active':''}}"><a href="#{{defName}}" role="tab" data-toggle="tab">{{defName}}</a></li>
    </ul>
    <div class="tab-content">
        <div ng-repeat="(defName,overallViewList) in importOverallViewMap" id="{{defName}}" class="tab-pane {{$index==0?'active':''}}" style="width:100%;height:100%;">
            <div ng-if="importOverallViewMap[defName].length==2" class="col-lg-9 col-lg-offset-3" style="color: red;">
                <label ab-tip="{position:{my:'bottom center',at:'top center'}}" title="发布新版本不会影响正在运行的流程实例，配置的更改也只会在新发起的流程中有所体现。">
                    <input type="radio" ng-model="importOverallViewMap[defName][0].isUpdateVersion" name="{{defName}}isUpdateVersion" value="true" ng-init="importOverallViewMap[defName][0].isUpdateVersion='true'">
                    保存后发布新版本
                </label>
                <label ab-tip="{position:{my:'bottom center',at:'top center'}}" title="覆盖当前流程版本会直接影响当前运行中的流程实例，假如有删除节点的情况请务必不要使用该模式。">
                    <input type="radio" ng-model="importOverallViewMap[defName][0].isUpdateVersion" name="{{defName}}isUpdateVersion" value="false">
                    覆盖当前系统存在的流程版本
                </label>
            </div>
            <div ng-repeat="overallView in overallViewList" class="{{overallViewList.length==1?'col-lg-12':'col-lg-6'}} overallConf" ng-init="defSetting = overallView.defSetting">
                <div id="a" ng-include="'overallViewContent'+($index)+'.html'" ng-init="$index==1 ? compareDefSetting = overallViewList[0].defSetting:''">
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>
<style>
    .table {margin-bottom: 5px;}
    textarea{
        max-width: 600px
    }
</style>